import request from '@/utils/request'

const api_name = "/oa/oaProcessTemplate"

export default {
  /**
   * 发布
   */
  publish(id){
    return request({
      url: `${api_name}/publish/${id}`,
      method: 'get'
    })
  },
  getById(id){
    return request({
      url: `${api_name}/${id}`,
      method: 'get'
    })
  },
  getPageList(pageNo,pageSize,searchObj){
    return request({
      url: `${api_name}/getPageList/${pageNo}/${pageSize}`,
      method: 'get',
      params: searchObj
    })
  },
  save(data){
    return request({
      url: `${api_name}/save`,
      method: 'post',
      data: data
    })
  },
  update(data){
    return request({
      url: `${api_name}/update`,
      method: 'put',
      data: data
    })
  },
  deleteById(id){
    return request({
      url: `${api_name}/delete/${id}`,
      method: 'delete'
    })
  }
}
